package model

import "gorm.io/datatypes"

type Project struct {
	Id                uint64         `json:"id" gorm:"column:id"`
	Name              string         `json:"name" gorm:"column:name"`
	Code              string         `json:"code" gorm:"column:code"`
	TenantId          uint64         `json:"tenant_id" gorm:"column:tenant_id"`
	Type              string         `json:"type" gorm:"column:type"`
	ProjectStatus     int64          `json:"project_status" gorm:"column:project_status"`
	BelongProjectId   int64          `json:"belong_project_id" gorm:"column:belong_project_id"`
	Public            string         `json:"public" gorm:"column:public"`
	IsDemo            string         `json:"is_demo" gorm:"column:is_demo"`
	ProjectTemplateId int64          `json:"project_template_id" gorm:"column:project_template_id"`
	Rate              string         `json:"rate" gorm:"column:rate"`
	StartTime         int64          `json:"start_time" gorm:"column:start_time"`
	EndTime           int64          `json:"end_time" gorm:"column:end_time"`
	Duration          string         `json:"duration" gorm:"column:duration"`
	Resolution        string         `json:"resolution" gorm:"column:resolution"`
	DeliveryTime      int64          `json:"delivery_time" gorm:"column:delivery_time"`
	DeliveryPlatform  string         `json:"delivery_platform" gorm:"column:delivery_platform"`
	Episodes          int64          `json:"episodes" gorm:"column:episodes"`
	FastWorkflow      string         `json:"fast_workflow" gorm:"column:fast_workflow"`
	WorkDir           string         `json:"work_dir" gorm:"column:work_dir"`
	WorkDirPrefix     string         `json:"work_dir_prefix" gorm:"column:work_dir_prefix"`
	ModuleCodes       string         `json:"module_codes" gorm:"column:module_codes"`
	EngineDirPrefix   string         `json:"engine_dir_prefix" gorm:"column:engine_dir_prefix"`
	CreatedBy         int64          `json:"created_by" gorm:"column:created_by"`
	Created           int64          `json:"created" gorm:"column:created"`
	Uuid              string         `json:"uuid" gorm:"column:uuid"`
	Json              datatypes.JSON `json:"json" gorm:"column:json"`
	DramaType         string         `json:"drama_type"`
	ProjectMediaIds   []int64        `json:"project_media_ids" gorm:"-:all"`
}

// TableName 设置表名
func (Project) TableName() string {
	return "project"
}

type ProjectJson struct {
	ProjectStatus interface{} `json:"project_status"`
	ProjectMedia  interface{} `json:"project_media"`
}
